<!doctype html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title>测试页面</title>
	<script type="text/javascript">
		function JSNotifyCpp() {
			var num = 1;
			while (num++ < 1000) {
				window.App.JSNotifyCppFunc("business" + num, num, "chinese" + num);
			}
		}


		window.OnRecvCppNotify = function (value1, value2) {
			alert("OnRecvCppNotify: " + value1 + ", " + value2);
		}

		function RegisterJsCbFunc() {
			window.App.RegisterCppNotifyCppFunc("cpp2js_test", OnRecvCppNotify);
		}

		window.App.RegisterCppNotifyCppFunc("cpp2js_user_logout", OnRecvCppNotify);

		window.onunload = function () {
			alert("确定要退出吗？");
		};
	</script>
</head>

<body style="width:100%;height:100%;background-color:green;">

	<input type="button" value='测试JS通知C++' onclick="JSNotifyCpp()" />
	<br />
	<br />
	<input type="button" value="注册JS回调函数，用于C++通知JS" onclick="RegisterJsCbFunc()" />

	<br />
	<br />
	<input type="button" value="测试跳转到/" onclick="window.location.href = '/'" />

	<br />
	<br />

	<input type="text" name="fname" />
	<br />
	<br />
	<input type="text" name="lname" />
</body>

</html>